package com.btkjgc.framework.report;

import java.util.ArrayList;
import java.util.List;

public class Report
{
	String id = "";
	String name = "";
	String headTitle = "";// 头标题
	String childTitle = "";// 子标题

	List<Toolbar> toolbar = new ArrayList<Toolbar>();// 工具条列表，每一个元素包含一个组件
	List<Chart> charts = new ArrayList<Chart>();// 折线图列表（个数<=2），目前两个折线图使用同一个样式
	Table table = new Table();// 一个表格

	public Report()
	{
	}

	public Report(String name, String headTitle, String childTitle,
			List<Toolbar> toolbar, List<Chart> charts, Table table)
	{
		this.name = name;
		this.headTitle = headTitle;
		this.childTitle = childTitle;
		this.toolbar = toolbar;
		this.charts = charts;
		this.table = table;
	}

	public String getId()
	{
		return id;
	}

	public void setId(String id)
	{
		this.id = id;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public List<Toolbar> getToolbar()
	{
		return toolbar;
	}

	public void setToolbar(List<Toolbar> toolbar)
	{
		this.toolbar = toolbar;
	}

	public List<Chart> getCharts()
	{
		return charts;
	}

	public void setCharts(List<Chart> charts)
	{
		this.charts = charts;
	}

	public Table getTable()
	{
		return table;
	}

	public void setTable(Table table)
	{
		this.table = table;
	}

	public String getHeadTitle()
	{
		return headTitle;
	}

	public void setHeadTitle(String headTitle)
	{
		this.headTitle = headTitle;
	}

	public String getChildTitle()
	{
		return childTitle;
	}

	public void setChildTitle(String childTitle)
	{
		this.childTitle = childTitle;
	}

	public Chart addChart(String name)
	{
		Chart chart = new Chart();
		chart.setName(name);
		charts.add(chart);
		return chart;
	}

	public Table addTable(String name)
	{
		table.setTableTitle(name);
		return table;
	}

	public Toolbar addToolbar(Integer type)
	{
		Toolbar temp = new Toolbar();
		temp.setType(type);
		this.toolbar.add(temp);
		return temp;
	}
}
